<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三明治造型</title>
</head>
<style>
    body{
        margin: 0;
    }
    .container{
        display: flex;
        flex-direction: column;
        /* position: absolute; */
        text-align: center;
        align-items: baseline;
        height: 100vh;
    }
    .head{
        width: 100%;
        height: 100px;
        flex-shrink: 0;
        background-color: darkgray;
        flex-basis: 100px;
        
    }
    .body{
        width: 100%;
        background-color:lightgray;
        flex-grow: 1;
    }
    .foot{
        height: 100px;
        width: 100%;
        background-color: darkgray;
        flex-shrink: 0;
        flex-basis: 100px;
    }
</style>
<body>
    <div class="container">
        <div class="head">页眉</div>
        <div class="body">主要内容</div>
        <div class="foot">页脚</div>
    </div>
</body>
</html>